<?php /* Smarty version Smarty-3.1.19, created on 2017-11-08 15:52:07
         compiled from "/www/wwwroot/kq.nabaowan.cn/sdk/theme/admin/default/views/index/index.html" */ ?>
<?php /*%%SmartyHeaderCode:6360682715a02b7a7f38896-31314064%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '23a3212a98136ce411ed6d9b160f9792a063e3d6' => 
    array (
      0 => '/www/wwwroot/kq.nabaowan.cn/sdk/theme/admin/default/views/index/index.html',
      1 => 1508891948,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '6360682715a02b7a7f38896-31314064',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'row' => 0,
    'v' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.19',
  'unifunc' => 'content_5a02b7a8063729_31476345',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5a02b7a8063729_31476345')) {function content_5a02b7a8063729_31476345($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('public/header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>


<div class="main-content">

<script>window.UEDITOR_HOME_URL = '<?php echo @constant('YD_URL');?>
libraries/ueditor1_4_3_3-utf8-php/';</script>
<script>window.UEDITOR_SERVER_URL = '<?php echo @constant('YD_URL');?>
index.php?con=admin/index/ueditor';</script>
<script>window.UEDITOR_REMOVE_URL = '<?php echo @constant('YD_URL');?>
';</script>
<script type="text/javascript" charset="utf-8" src="<?php echo @constant('YD_URL');?>
libraries/ueditor1_4_3_3-utf8-php/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="<?php echo @constant('YD_URL');?>
libraries/ueditor1_4_3_3-utf8-php/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="<?php echo @constant('YD_URL');?>
libraries/ueditor1_4_3_3-utf8-php/lang/zh-cn/zh-cn.js"></script>
<script type="text/plain" id="j_ueditorupload" style="height:5px;display:none;"></script>
<script type="text/javascript" charset="utf-8" src="<?php echo @constant('YD_URL');?>
libraries/ueditor1_4_3_3-utf8-php/ueditor.upload.js"></script>


<div class="page-content">
  <div class="page-content-area" style="opacity: 0.8;"> <br>
    <div class="page-header">
    <?php if ($_smarty_tpl->tpl_vars['row']->value['type']!=1) {?>
      <h1> 学校信息 <small><i class="ace-icon fa fa-angle-double-right"></i> 编辑信息 </small> </h1>
    <?php } else { ?>
      <h1> 个人信息 <small><i class="ace-icon fa fa-angle-double-right"></i> 编辑信息 </small> </h1>
    <?php }?>
    </div>
    <div class="row">
      <div class="panel panel-default">
        <div class="panel-body table-responsive">
          <form method="post" class="form-horizontal" role="form" id="submitform" onsubmit="return false">
			<div class="form-group ">
              <div class="col-md-6">
                <label class="control-label" for="name">名称</label>
                <input type="text" class="form-control" id="name" name="name" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['name'];?>
" required>
              </div>
            </div>
            <div class="form-group ">
              <div class="col-md-6">
                <label class="control-label" for="gname">管理员姓名</label>
                <input type="text" class="form-control" id="gname" name="gname" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['gname'];?>
">
              </div>
            </div>
            <div class="form-group ">
              <div class="col-md-6">
                <label class="control-label" for="email">登陆邮箱</label>
                <input type="text" class="form-control" id="email" name="email" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['email'];?>
" required>
              </div>
            </div>
            <div class="form-group ">
              <div class="col-md-6">
                <label class="control-label" for="password">密码</label>
                <input type="text" class="form-control" id="password" name="password" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['password'];?>
" required>
              </div>
            </div>
            <div class="form-group ">
              <div class="col-md-6">
                <label class="control-label" for="phone">联系电话</label>
                <input type="text" class="form-control" id="phone" name="phone" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['phone'];?>
">
              </div>
            </div>
            <div class="form-group ">
              <div class="col-md-6">
                <label class="control-label" for="address">所在地址</label>
                <input type="text" class="form-control" id="address" name="address" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['address'];?>
">
              </div>
            </div>
            
            <div class="form-group">
              <input type="hidden" name="video" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['video'];?>
" />
              <div class="col-md-6">
                <label class="control-label">广告视频</label>
                <div class="upfile_filediv">
                  <div class="upfile_filecaption"> <span class="upfile_link"><?php if ($_smarty_tpl->tpl_vars['row']->value['video']) {?><a href="<?php echo @constant('YD_URL');?>
<?php echo $_smarty_tpl->tpl_vars['row']->value['video'];?>
" target="_blank"><?php echo @constant('YD_URL');?>
<?php echo $_smarty_tpl->tpl_vars['row']->value['video'];?>
</a><?php }?></span> <a href="javascript:;" data-type="filediv" class="btn btn-primary btn-xs btn-upfile">上传</a> <a href="javascript:;" data-type="filediv" class="btn btn-default btn-xs btn-upremove">删除</a> </div>
                </div>
              </div>
            </div>
            
            <div class="form-group">
              <div class="col-md-6">
              <label class="control-label">轮播图片</label>
              <textarea name="banner" style="display:none"><?php echo $_smarty_tpl->tpl_vars['row']->value['banner'];?>
</textarea>
                <div class="banner"> <?php if (count($_smarty_tpl->tpl_vars['row']->value['banner'])) {?>
                  <?php  $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_fromtemp = explode("\n",str_replace("\r",'',$_smarty_tpl->tpl_vars['row']->value['banner'])); $_from = explode("\n",str_replace("\r",'',$_smarty_tpl->tpl_vars['row']->value['banner'])); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if($_fromtemp)foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value) {
$_smarty_tpl->tpl_vars['v']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['v']->key;
?>
                  <?php if ($_smarty_tpl->tpl_vars['v']->value) {?>
                  <div class="upfile_imgthumb"> <img src="<?php echo @constant('YD_URL');?>
<?php echo $_smarty_tpl->tpl_vars['v']->value;?>
" data-default="" class="btn-upfile" data-multi="1">
                    <div class="upfile_imgcaption">
                      <a href="javascript:;" data-src="<?php echo @constant('YD_URL');?>
<?php echo $_smarty_tpl->tpl_vars['v']->value;?>
" data-multi="1" class="btn btn-primary btn-xs btn-upfile">上传</a> <a href="javascript:;" data-src="<?php echo @constant('YD_URL');?>
<?php echo $_smarty_tpl->tpl_vars['v']->value;?>
" data-multi="1" class="btn btn-default btn-xs btn-upremove">删除</a> </div>
                  </div>
                  <?php }?>
                  <?php } ?>
                  <?php }?>
                </div>
                <a href="javascipt:;" class="btn btn-upfile btn-primary btn-sm" style="width:121px" data-multi="1" data-conr=".banner">+ 上传图片</a>
              </div>
            </div>

            <div class="form-group">
              <div class="col-md-6">
                <button type="submit" class="btn btn-primary btn-lg btn-submit">提交</button>
              </div>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>
<script>
var isbusy = false;
$(function(){
	$('#submitform').validate({
		focusInvalid: true,
		rules: {
			//title: {
				//required: true
			//}
		}
	});
	$('.btn-submit').click(function(){
		if(!$('#submitform').valid())return false;
		if(isbusy)return false;
		isbusy = true;
		tooltipbox.show('正在执行操作...');
		$.post(location.href, $('#submitform').serialize(), function(res){
		    if(res.code == 1){
				location.href = '<?php echo siteurl("con=admin/index");?>
';
			}
			tooltipbox.show(res.msg);	
			isbusy = false;
		}, 'json').error(function(a, b, c){
			tooltipbox.show('数据或网络错误');
			isbusy = false;
		});
	});
});
</script> 
<?php echo $_smarty_tpl->getSubTemplate ('public/footer.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
 <?php }} ?>
